Scale tablet output size when UI Scaling mode is "Everything" #31141
+43
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #12098
Keeping this as a draft until ppy/osu-framework#6460 merges.
Description
Based on discussions in the issue, scaling tablet output when UI Scaling mode is set to "Everything" will address the needs of full area tablet players who use screen scaling. With this PR, tablet output will not scale when UI Scaling is set to "Gameplay Only" or "Exclude Overlays" since this results in elements being non-interactable with the tablet, which may or may not be desirable for some users and requires further discussion.
Demonstration
untitled.mp4
In the first half of the video I demonstrate how on the current lazer client, when the UI is scaled the tablet area is still mapped to the entire window. This results in a significant portion of the tablet area becoming unusable during gameplay.
In the second half of the video, I demonstrate how on this branch, when the UI is scaled the tablet area is mapped only to the scaled portion of the game window. This means the full tablet area can be used for gameplay.
Manual Testing
Initial game launch with no configuration (deleted osu-development folder)
Game initialized with ScalingMode=Off, and tablet set to full area as expected
Set ScaleMode=Everything
Tablet area appropriately mapped to only the scaled area
All other ScaleMode values
Tablet area appropriately mapped to the full screen.
Automated testing
Testing this might require mocking tablet input in order to ensure the cursor position is correct for the given layout configuration. But I don't see any examples of this in other tests. I'm open to suggestions on how best to introduce automated testing for this feature, as I'm not familiar enough with the existing testing practices.
Dependencies
Depends on
osu-framework
changes: ppy/osu-framework#6460